import { createRouter, createWebHistory } from 'vue-router';
import Login from '@/views/login.vue'; // 假设你有一个 Login 组件
import  ShouYe from '@/views/xiaofang/index.vue';

const routes = [
    {
        path: '/',
        redirect: '/login' // 将根路径重定向到登录页
    },
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/shouYe',
        name: 'shouYe',
        component: ShouYe
    },
    {
        path: '/reg',
        name: 'reg',
        component: () => import('@/views/reg.vue')
    }
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;
